// Header.h	class Header

#ifndef _KC_XML_TAG__H_2008_KC_
#define _KC_XML_TAG__H_2008_KC_

#include <string>
 
namespace kc_sf
{

class Tag
{
    public:

        typedef enum { UNDEFINED_T, 
                       MAX_SESSIONS_T, 
                       MAX_THREADS_T,
                       MY_DOMAIN_T, 
                       LISTEN_PORT_T, 
                       LOGS_FILE_T,
                       LOGS_LEVEL_T, 
                       SIZE_T, 
                       ATTACHMENTS_NR_T,
                       KEYWORD_T, 
                       OCCUR_T, 
                       NAME_T, 
                       RANGE_T,
                       TYPE_T, 
                       SUBTYPE_T, 
                       HEADER_TYPE_T,
                       LOCALPART_T, 
                       DOMAIN_T, 
                       ACTION_T } 
                Type;
        
        explicit Tag( const std::string &_name = "", 
                      const std::string &_value = "",
                      Type _type = UNDEFINED_T );
        
        void setName( const std::string &name );
        void setValue( const std::string &value );
        void setType( Type type );
        
        const std::string & name() const;
        const std::string & value() const;
        Type type() const;        
        
        std::string attribute( const std::string &attr );  // wydziela z nazwy wartość attr=
    
    private:
    
        std::string t_name;
        std::string t_value;
        Type        t_type;
};

}

#endif // _KC_XML_TAG__H_2008_KC_
